#pragma once

#include <map>
#include <string>
#include <memory>
#include "../../utils/common_ptr.h"

class VisitorFeature
{
public:
  static VisitorFeature OutputUCase;
  static VisitorFeature OutputPrettyFormat;
  static VisitorFeature OutputParameterized;
  static VisitorFeature OutputDesensitize;
  static VisitorFeature OutputUseInsertValueClauseOriginalString;
  static VisitorFeature OutputSkipSelectListCacheString;
  static VisitorFeature OutputSkipInsertColumnsString;
  static VisitorFeature OutputParameterizedQuesUnMergeInList;
  static VisitorFeature OutputParameterizedQuesUnMergeOr;
  static VisitorFeature OutputParameterizedQuesUnMergeAnd;
  static VisitorFeature OutputParameterizedQuesUnMergeValuesList;
  static VisitorFeature OutputParameterizedUnMergeShardingTable;
  static VisitorFeature OutputParameterizedZeroReplaceNotUseOriginalSql;
  static VisitorFeature OutputRegForPresto;
  /**
   * @deprecated
   */
  static VisitorFeature OutputKeepParenthesisWhenNotExpr;

  static VisitorFeature OutputNameQuote;
  static VisitorFeature OutputDistributedLiteralInCreateTableStmt;

  // private:
  //   static std::map<u_int64_t, string_ptr > str;
  //   static std::map<string_ptr , u_int64_t> str_int;
  //   static string_ptr  currstr;
  //   static _MyEnum _enum;
  //   static u_int64_t mask;
  // public:
  VisitorFeature();
  VisitorFeature(uint64_t mask, string_ptr name);
  VisitorFeature(VisitorFeature *visitor);

  string_ptr name;
  uint64_t mask;

  //   _MyEnum& operator=(_MyEnum& rgt);
  //   _MyEnum& operator=(VisitorFeature& rgt);
  //   BOOL_ptr operator==(VisitorFeature& rgt) ;
  //   BOOL_ptr operator==(_MyEnum& rgt) ;
  //   static string_ptr  toString() ;
  //   int value() ;
  //   static string_ptr  toString(_MyEnum& val, BOOL_ptr ucase);
  static uint64_t config(int features, std::shared_ptr<VisitorFeature> feature, BOOL_ptr state);
  static uint64_t of(std::shared_ptr<std::list<std::shared_ptr<VisitorFeature>>> features);
  static BOOL_ptr isEnabled(int features, std::shared_ptr<VisitorFeature> feature);
};
